package pt.inescid.components.overlaymanager;

import rice.p2p.past.ContentHashPastContent;
import rice.p2p.commonapi.Id;

/**
 * 
 * Content Result
 * 
 * @author Sergio Esteves
 */
public class ContentResult extends ContentHashPastContent {

	private static final long serialVersionUID = 7526472295622776147L;	

	/**
	 * Store the content.
	 * 
	 * Note that this class is Serializable, so any non-transient field will 
	 * automatically be stored to to disk.
	 */
	byte[] taskResult;   
	
	/**
	 * Takes an environment for the timestamp
	 * An IdFactory to generate the hash
	 * The content to be stored.
	 * 
	 * @param idf to generate a hash of the content
	 * @param content to be stored
	 */
	public ContentResult(Id id, byte[] taskResult) {
		super(id);
		this.taskResult = taskResult;
	}

	public byte[] getTaskResult(){
		return taskResult;
	}

	public String toString() {
		return "ContentResult [" + taskResult + "]";
	}
}